/*action create by pionner code builder*/
package com.pioneer.app.dev.osuser.user;

import com.opensymphony.xwork2.Action;

import java.io.Serializable;

public class TUserActionbak implements Action, Serializable {

	// key
	private java.lang.Integer id;

	private java.lang.Integer[] ids;
	private TUser tuser;
	private java.lang.String code;
	private java.lang.String loginName;
	private java.lang.String nickName;
	private java.lang.String name;
	private java.lang.String telphone;
	private java.lang.String mobil;
	private java.lang.String email;
	private java.lang.String address;
	private java.lang.String passwore;
	private java.lang.String status;
	private java.lang.String lastVisitTime;
	private java.lang.String photoPath;
	private java.lang.String postName;
	private java.lang.String isCryptograph;
	/** Ĭ�Ϲ��췽�� */
	public TUserActionbak(){
	}
	/** full constructor */
	public TUserActionbak(java.lang.String code,java.lang.String loginName,java.lang.String nickName,java.lang.String name,java.lang.String telphone,java.lang.String mobil,java.lang.String email,java.lang.String address,java.lang.String passwore,java.lang.String status,java.lang.String lastVisitTime,java.lang.String photoPath,java.lang.String postName,java.lang.String isCryptograp){
		this.code=code;
		this.loginName=loginName;
		this.nickName=nickName;
		this.name=name;
		this.telphone=telphone;
		this.mobil=mobil;
		this.email=email;
		this.address=address;
		this.passwore=passwore;
		this.status=status;
		this.lastVisitTime=lastVisitTime;
		this.photoPath=photoPath;
		this.postName=postName;
		this.isCryptograph=isCryptograph;

	}
	public void setId(java.lang.Integer id){
		this.id=id;
	}
	public java.lang.Integer getId(){
		return id;
	}

	public void setIds(java.lang.Integer[] ids){
		this.ids=ids;
	}
	public java.lang.Integer[] getIds(){
		return ids;
	}

	public void setTUser(TUser tuser){
		this.tuser=tuser;
	}
	public TUser getTUser(){
		return tuser;
	}

	public void setCode(java.lang.String code){
		this.code=code;
	}
	public java.lang.String getCode(){
		return code;
	}

	public void setLoginName(java.lang.String loginName){
		this.loginName=loginName;
	}
	public java.lang.String getLoginName(){
		return loginName;
	}

	public void setNickName(java.lang.String nickName){
		this.nickName=nickName;
	}
	public java.lang.String getNickName(){
		return nickName;
	}

	public void setName(java.lang.String name){
		this.name=name;
	}
	public java.lang.String getName(){
		return name;
	}

	public void setTelphone(java.lang.String telphone){
		this.telphone=telphone;
	}
	public java.lang.String getTelphone(){
		return telphone;
	}

	public void setMobil(java.lang.String mobil){
		this.mobil=mobil;
	}
	public java.lang.String getMobil(){
		return mobil;
	}

	public void setEmail(java.lang.String email){
		this.email=email;
	}
	public java.lang.String getEmail(){
		return email;
	}

	public void setAddress(java.lang.String address){
		this.address=address;
	}
	public java.lang.String getAddress(){
		return address;
	}

	public void setPasswore(java.lang.String passwore){
		this.passwore=passwore;
	}
	public java.lang.String getPasswore(){
		return passwore;
	}

	public void setStatus(java.lang.String status){
		this.status=status;
	}
	public java.lang.String getStatus(){
		return status;
	}

	public void setLastVisitTime(java.lang.String lastVisitTime){
		this.lastVisitTime=lastVisitTime;
	}
	public java.lang.String getLastVisitTime(){
		return lastVisitTime;
	}

	public void setPhotoPath(java.lang.String photoPath){
		this.photoPath=photoPath;
	}
	public java.lang.String getPhotoPath(){
		return photoPath;
	}

	public void setPostName(java.lang.String postName){
		this.postName=postName;
	}
	public java.lang.String getPostName(){
		return postName;
	}

	public void setIsCryptograph(java.lang.String isCryptograph){
		this.isCryptograph=isCryptograph;
	}
	public java.lang.String getIsCryptograph(){
		return isCryptograph;
	}

	public String execute() throws Exception {
		return "SUCESS";
	}

	public String doList(){
		return "list";
	}

	public String doAdd(){
		return "add";
	}

	public String doEdit(){
		return "edit";
	}

	public String doSave(){
		this.buildObj();
		if(null==this.tuser.getId()){
//		insert a new object
			TUserDAO dao=new TUserDAO();
			this.tuser.setId(new Integer(57));
			
			dao.save(this.tuser);
		}else{
//		update the object
		}
		return "list";
	}

	public String doDetail(){
		return "detail";
	}

	private void buildObj(){
		this.tuser=new TUser();
		this.tuser.setId(this.id);
		this.tuser.setCode(this.code);
		this.tuser.setLoginName(this.loginName);
		this.tuser.setNickName(this.nickName);
		this.tuser.setName(this.name);
		this.tuser.setTelphone(this.telphone);
		this.tuser.setMobil(this.mobil);
		this.tuser.setEmail(this.email);
		this.tuser.setAddress(this.address);
		this.tuser.setPasswore(this.passwore);
		this.tuser.setStatus(this.status);
		this.tuser.setLastVisitTime(this.lastVisitTime);
		this.tuser.setPhotoPath(this.photoPath);
		this.tuser.setPostName(this.postName);
		this.tuser.setIsCryptograph(this.isCryptograph);
	}
}